Optimal. Leaf size=152 \[ \frac {1}{3} b^2 c^2 x+\frac {1}{3} b^2 c^3 \cot ^{-1}\left (\frac {x}{c}\right )+\frac {1}{3} b c x^2 \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right )-\frac {1}{3} i c^3 \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right )^2+\frac {1}{3} x^3 \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right )^2+\frac {2}{3} b c^3 \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right ) \log \left (2-\frac {2}{1-\frac {i c}{x}}\right )-\frac {1}{3} i b^2 c^3 \text {PolyLog}\left (2,-1+\frac {2}{1-\frac {i c}{x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4948, 4946,
5038, 331, 209, 5044, 4988, 2497} \begin {gather*} -\frac {1}{3} i c^3 \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right )^2+\frac {2}{3} b c^3 \log \left (2-\frac {2}{1-\frac {i c}{x}}\right ) \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right )+\frac {1}{3} x^3 \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right )^2+\frac {1}{3} b c x^2 \left (a+b \cot ^{-1}\left (\frac {x}{c}\right )\right )-\frac {1}{3} i b^2 c^3 \text {Li}_2\left (\frac {2}{1-\frac {i c}{x}}-1\right )+\frac {1}{3} b^2 c^3 \cot ^{-1}\left (\frac {x}{c}\right )+\frac {1}{3} b^2 c^2 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 331
Rule 2497
Rule 4946
Rule 4948
Rule 4988
Rule 5038
Rule 5044
Rubi steps
\begin {align*} \int x^2 \left (a+b \tan ^{-1}\left (\frac {c}{x}\right )\right )^2 \, dx &=\int \left (\frac {1}{4} x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2+\frac {1}{2} b x^2 \left (-2 i a+b \log \left (1-\frac {i c}{x}\right )\right ) \log \left (1+\frac {i c}{x}\right )-\frac {1}{4} b^2 x^2 \log ^2\left (1+\frac {i c}{x}\right )\right ) \, dx\\ &=\frac {1}{4} \int x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2 \, dx+\frac {1}{2} b \int x^2 \left (-2 i a+b \log \left (1-\frac {i c}{x}\right )\right ) \log \left (1+\frac {i c}{x}\right ) \, dx-\frac {1}{4} b^2 \int x^2 \log ^2\left (1+\frac {i c}{x}\right ) \, dx\\ &=-\left (\frac {1}{4} \text {Subst}\left (\int \frac {(2 a+i b \log (1-i c x))^2}{x^4} \, dx,x,\frac {1}{x}\right )\right )+\frac {1}{2} b \int \left (-2 i a x^2 \log \left (1+\frac {i c}{x}\right )+b x^2 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )\right ) \, dx+\frac {1}{4} b^2 \text {Subst}\left (\int \frac {\log ^2(1+i c x)}{x^4} \, dx,x,\frac {1}{x}\right )\\ &=\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-(i a b) \int x^2 \log \left (1+\frac {i c}{x}\right ) \, dx+\frac {1}{2} b^2 \int x^2 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right ) \, dx-\frac {1}{6} (b c) \text {Subst}\left (\int \frac {2 a+i b \log (1-i c x)}{x^3 (1-i c x)} \, dx,x,\frac {1}{x}\right )+\frac {1}{6} \left (i b^2 c\right ) \text {Subst}\left (\int \frac {\log (1+i c x)}{x^3 (1+i c x)} \, dx,x,\frac {1}{x}\right )\\ &=\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{6} (i b) \text {Subst}\left (\int \frac {2 a+i b \log (x)}{x \left (-\frac {i}{c}+\frac {i x}{c}\right )^3} \, dx,x,1-\frac {i c}{x}\right )-\frac {1}{2} b^2 \int \frac {c x^2 \log \left (1-\frac {i c}{x}\right )}{3 (-c+i x)} \, dx-\frac {1}{2} b^2 \int \frac {c x^2 \log \left (1+\frac {i c}{x}\right )}{3 (-c-i x)} \, dx+\frac {1}{3} (a b c) \int \frac {x}{1+\frac {i c}{x}} \, dx+\frac {1}{6} \left (i b^2 c\right ) \text {Subst}\left (\int \left (\frac {\log (1+i c x)}{x^3}-\frac {i c \log (1+i c x)}{x^2}-\frac {c^2 \log (1+i c x)}{x}+\frac {c^3 \log (1+i c x)}{-i+c x}\right ) \, dx,x,\frac {1}{x}\right )\\ &=\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{6} (i b) \text {Subst}\left (\int \frac {2 a+i b \log (x)}{\left (-\frac {i}{c}+\frac {i x}{c}\right )^3} \, dx,x,1-\frac {i c}{x}\right )+\frac {1}{6} (b c) \text {Subst}\left (\int \frac {2 a+i b \log (x)}{x \left (-\frac {i}{c}+\frac {i x}{c}\right )^2} \, dx,x,1-\frac {i c}{x}\right )+\frac {1}{3} (a b c) \int \frac {x^2}{i c+x} \, dx+\frac {1}{6} \left (i b^2 c\right ) \text {Subst}\left (\int \frac {\log (1+i c x)}{x^3} \, dx,x,\frac {1}{x}\right )-\frac {1}{6} \left (b^2 c\right ) \int \frac {x^2 \log \left (1-\frac {i c}{x}\right )}{-c+i x} \, dx-\frac {1}{6} \left (b^2 c\right ) \int \frac {x^2 \log \left (1+\frac {i c}{x}\right )}{-c-i x} \, dx+\frac {1}{6} \left (b^2 c^2\right ) \text {Subst}\left (\int \frac {\log (1+i c x)}{x^2} \, dx,x,\frac {1}{x}\right )-\frac {1}{6} \left (i b^2 c^3\right ) \text {Subst}\left (\int \frac {\log (1+i c x)}{x} \, dx,x,\frac {1}{x}\right )+\frac {1}{6} \left (i b^2 c^4\right ) \text {Subst}\left (\int \frac {\log (1+i c x)}{-i+c x} \, dx,x,\frac {1}{x}\right )\\ &=\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} b^2 c^2 x \log \left (1+\frac {i c}{x}\right )-\frac {1}{12} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )+\frac {1}{6} (b c) \text {Subst}\left (\int \frac {2 a+i b \log (x)}{\left (-\frac {i}{c}+\frac {i x}{c}\right )^2} \, dx,x,1-\frac {i c}{x}\right )+\frac {1}{3} (a b c) \int \left (-i c+\frac {i c^2}{c-i x}+x\right ) \, dx-\frac {1}{12} \left (i b^2 c\right ) \text {Subst}\left (\int \frac {1}{x \left (-\frac {i}{c}+\frac {i x}{c}\right )^2} \, dx,x,1-\frac {i c}{x}\right )-\frac {1}{6} \left (b^2 c\right ) \int \left (-c \log \left (1-\frac {i c}{x}\right )+\frac {c^2 \log \left (1-\frac {i c}{x}\right )}{c-i x}-i x \log \left (1-\frac {i c}{x}\right )\right ) \, dx-\frac {1}{6} \left (b^2 c\right ) \int \left (-c \log \left (1+\frac {i c}{x}\right )+\frac {c^2 \log \left (1+\frac {i c}{x}\right )}{c+i x}+i x \log \left (1+\frac {i c}{x}\right )\right ) \, dx+\frac {1}{6} \left (i b c^2\right ) \text {Subst}\left (\int \frac {2 a+i b \log (x)}{x \left (-\frac {i}{c}+\frac {i x}{c}\right )} \, dx,x,1-\frac {i c}{x}\right )-\frac {1}{12} \left (b^2 c^2\right ) \text {Subst}\left (\int \frac {1}{x^2 (1+i c x)} \, dx,x,\frac {1}{x}\right )+\frac {1}{6} \left (i b^2 c^3\right ) \text {Subst}\left (\int \frac {1}{x (1+i c x)} \, dx,x,\frac {1}{x}\right )+\frac {1}{6} \left (i b^2 c^3\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1+\frac {i c}{x}\right )\\ &=-\frac {1}{3} i a b c^2 x+\frac {1}{6} a b c x^2+\frac {1}{6} i b c^2 \left (1-\frac {i c}{x}\right ) x \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} b^2 c^2 x \log \left (1+\frac {i c}{x}\right )-\frac {1}{12} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )+\frac {1}{12} i b^2 c^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{3} a b c^3 \log (c-i x)+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )-\frac {1}{12} \left (i b^2 c\right ) \text {Subst}\left (\int \left (-\frac {c^2}{(-1+x)^2}+\frac {c^2}{-1+x}-\frac {c^2}{x}\right ) \, dx,x,1-\frac {i c}{x}\right )+\frac {1}{6} \left (i b^2 c\right ) \int x \log \left (1-\frac {i c}{x}\right ) \, dx-\frac {1}{6} \left (i b^2 c\right ) \int x \log \left (1+\frac {i c}{x}\right ) \, dx+\frac {1}{6} \left (i b c^2\right ) \text {Subst}\left (\int \frac {2 a+i b \log (x)}{-\frac {i}{c}+\frac {i x}{c}} \, dx,x,1-\frac {i c}{x}\right )-\frac {1}{12} \left (b^2 c^2\right ) \text {Subst}\left (\int \left (\frac {1}{x^2}-\frac {i c}{x}+\frac {i c^2}{-i+c x}\right ) \, dx,x,\frac {1}{x}\right )+\frac {1}{6} \left (b^2 c^2\right ) \int \log \left (1-\frac {i c}{x}\right ) \, dx+\frac {1}{6} \left (b^2 c^2\right ) \int \log \left (1+\frac {i c}{x}\right ) \, dx+\frac {1}{6} \left (b^2 c^2\right ) \text {Subst}\left (\int \frac {1}{-\frac {i}{c}+\frac {i x}{c}} \, dx,x,1-\frac {i c}{x}\right )-\frac {1}{6} \left (b c^3\right ) \text {Subst}\left (\int \frac {2 a+i b \log (x)}{x} \, dx,x,1-\frac {i c}{x}\right )+\frac {1}{6} \left (i b^2 c^3\right ) \text {Subst}\left (\int \frac {1}{x} \, dx,x,\frac {1}{x}\right )-\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log \left (1-\frac {i c}{x}\right )}{c-i x} \, dx-\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log \left (1+\frac {i c}{x}\right )}{c+i x} \, dx+\frac {1}{6} \left (b^2 c^4\right ) \text {Subst}\left (\int \frac {1}{1+i c x} \, dx,x,\frac {1}{x}\right )\\ &=-\frac {1}{3} i a b c^2 x+\frac {1}{6} b^2 c^2 x+\frac {1}{6} a b c x^2-\frac {1}{4} i b^2 c^3 \log \left (i-\frac {c}{x}\right )+\frac {1}{12} i b^2 c^3 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} b^2 c^2 x \log \left (1-\frac {i c}{x}\right )+\frac {1}{12} i b^2 c x^2 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} i b c^2 \left (1-\frac {i c}{x}\right ) x \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} i c^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )+\frac {1}{12} i b^2 c^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{3} a b c^3 \log (c-i x)-\frac {1}{6} i b^2 c^3 \log \left (1-\frac {i c}{x}\right ) \log (c-i x)+\frac {1}{6} i b^2 c^3 \log \left (1+\frac {i c}{x}\right ) \log (c+i x)-\frac {1}{3} a b c^3 \log (x)+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )+\frac {1}{12} \left (b^2 c^2\right ) \int \frac {1}{1-\frac {i c}{x}} \, dx+\frac {1}{12} \left (b^2 c^2\right ) \int \frac {1}{1+\frac {i c}{x}} \, dx-\frac {1}{6} \left (b^2 c^2\right ) \text {Subst}\left (\int \frac {\log (x)}{-\frac {i}{c}+\frac {i x}{c}} \, dx,x,1-\frac {i c}{x}\right )-\frac {1}{6} \left (i b^2 c^3\right ) \int \frac {1}{\left (1-\frac {i c}{x}\right ) x} \, dx+\frac {1}{6} \left (i b^2 c^3\right ) \int \frac {1}{\left (1+\frac {i c}{x}\right ) x} \, dx-\frac {1}{6} \left (b^2 c^4\right ) \int \frac {\log (c-i x)}{\left (1-\frac {i c}{x}\right ) x^2} \, dx-\frac {1}{6} \left (b^2 c^4\right ) \int \frac {\log (c+i x)}{\left (1+\frac {i c}{x}\right ) x^2} \, dx\\ &=-\frac {1}{3} i a b c^2 x+\frac {1}{6} b^2 c^2 x+\frac {1}{6} a b c x^2-\frac {1}{4} i b^2 c^3 \log \left (i-\frac {c}{x}\right )+\frac {1}{12} i b^2 c^3 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} b^2 c^2 x \log \left (1-\frac {i c}{x}\right )+\frac {1}{12} i b^2 c x^2 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} i b c^2 \left (1-\frac {i c}{x}\right ) x \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} i c^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )+\frac {1}{12} i b^2 c^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{3} a b c^3 \log (c-i x)-\frac {1}{6} i b^2 c^3 \log \left (1-\frac {i c}{x}\right ) \log (c-i x)+\frac {1}{6} i b^2 c^3 \log \left (1+\frac {i c}{x}\right ) \log (c+i x)-\frac {1}{3} a b c^3 \log (x)+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (\frac {i c}{x}\right )+\frac {1}{12} \left (b^2 c^2\right ) \int \frac {x}{-i c+x} \, dx+\frac {1}{12} \left (b^2 c^2\right ) \int \frac {x}{i c+x} \, dx-\frac {1}{6} \left (i b^2 c^3\right ) \int \frac {1}{-i c+x} \, dx+\frac {1}{6} \left (i b^2 c^3\right ) \int \frac {1}{i c+x} \, dx-\frac {1}{6} \left (b^2 c^4\right ) \int \left (\frac {\log (c-i x)}{c (c+i x)}+\frac {i \log (c-i x)}{c x}\right ) \, dx-\frac {1}{6} \left (b^2 c^4\right ) \int \left (\frac {\log (c+i x)}{c (c-i x)}-\frac {i \log (c+i x)}{c x}\right ) \, dx\\ &=-\frac {1}{3} i a b c^2 x+\frac {1}{6} b^2 c^2 x+\frac {1}{6} a b c x^2-\frac {1}{4} i b^2 c^3 \log \left (i-\frac {c}{x}\right )+\frac {1}{12} i b^2 c^3 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} b^2 c^2 x \log \left (1-\frac {i c}{x}\right )+\frac {1}{12} i b^2 c x^2 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} i b c^2 \left (1-\frac {i c}{x}\right ) x \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} i c^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )+\frac {1}{12} i b^2 c^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{3} a b c^3 \log (c-i x)+\frac {1}{6} i b^2 c^3 \log (c-i x)-\frac {1}{6} i b^2 c^3 \log \left (1-\frac {i c}{x}\right ) \log (c-i x)-\frac {1}{6} i b^2 c^3 \log (c+i x)+\frac {1}{6} i b^2 c^3 \log \left (1+\frac {i c}{x}\right ) \log (c+i x)-\frac {1}{3} a b c^3 \log (x)+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (\frac {i c}{x}\right )+\frac {1}{12} \left (b^2 c^2\right ) \int \left (1-\frac {c}{c-i x}\right ) \, dx+\frac {1}{12} \left (b^2 c^2\right ) \int \left (1-\frac {c}{c+i x}\right ) \, dx-\frac {1}{6} \left (i b^2 c^3\right ) \int \frac {\log (c-i x)}{x} \, dx+\frac {1}{6} \left (i b^2 c^3\right ) \int \frac {\log (c+i x)}{x} \, dx-\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log (c-i x)}{c+i x} \, dx-\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log (c+i x)}{c-i x} \, dx\\ &=-\frac {1}{3} i a b c^2 x+\frac {1}{3} b^2 c^2 x+\frac {1}{6} a b c x^2-\frac {1}{4} i b^2 c^3 \log \left (i-\frac {c}{x}\right )+\frac {1}{12} i b^2 c^3 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} b^2 c^2 x \log \left (1-\frac {i c}{x}\right )+\frac {1}{12} i b^2 c x^2 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} i b c^2 \left (1-\frac {i c}{x}\right ) x \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} i c^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )+\frac {1}{12} i b^2 c^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{3} a b c^3 \log (c-i x)+\frac {1}{12} i b^2 c^3 \log (c-i x)-\frac {1}{6} i b^2 c^3 \log \left (1-\frac {i c}{x}\right ) \log (c-i x)-\frac {1}{12} i b^2 c^3 \log (c+i x)+\frac {1}{6} i b^2 c^3 \log \left (1+\frac {i c}{x}\right ) \log (c+i x)-\frac {1}{6} i b^2 c^3 \log \left (\frac {c-i x}{2 c}\right ) \log (c+i x)+\frac {1}{6} i b^2 c^3 \log (c-i x) \log \left (\frac {c+i x}{2 c}\right )-\frac {1}{3} a b c^3 \log (x)+\frac {1}{6} i b^2 c^3 \log (c+i x) \log \left (-\frac {i x}{c}\right )-\frac {1}{6} i b^2 c^3 \log (c-i x) \log \left (\frac {i x}{c}\right )+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (\frac {i c}{x}\right )-\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log \left (\frac {c-i x}{2 c}\right )}{c+i x} \, dx-\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log \left (\frac {c+i x}{2 c}\right )}{c-i x} \, dx+\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log \left (-\frac {i x}{c}\right )}{c+i x} \, dx+\frac {1}{6} \left (b^2 c^3\right ) \int \frac {\log \left (\frac {i x}{c}\right )}{c-i x} \, dx\\ &=-\frac {1}{3} i a b c^2 x+\frac {1}{3} b^2 c^2 x+\frac {1}{6} a b c x^2-\frac {1}{4} i b^2 c^3 \log \left (i-\frac {c}{x}\right )+\frac {1}{12} i b^2 c^3 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} b^2 c^2 x \log \left (1-\frac {i c}{x}\right )+\frac {1}{12} i b^2 c x^2 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} i b c^2 \left (1-\frac {i c}{x}\right ) x \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} i c^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )+\frac {1}{12} i b^2 c^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{3} a b c^3 \log (c-i x)+\frac {1}{12} i b^2 c^3 \log (c-i x)-\frac {1}{6} i b^2 c^3 \log \left (1-\frac {i c}{x}\right ) \log (c-i x)-\frac {1}{12} i b^2 c^3 \log (c+i x)+\frac {1}{6} i b^2 c^3 \log \left (1+\frac {i c}{x}\right ) \log (c+i x)-\frac {1}{6} i b^2 c^3 \log \left (\frac {c-i x}{2 c}\right ) \log (c+i x)+\frac {1}{6} i b^2 c^3 \log (c-i x) \log \left (\frac {c+i x}{2 c}\right )-\frac {1}{3} a b c^3 \log (x)+\frac {1}{6} i b^2 c^3 \log (c+i x) \log \left (-\frac {i x}{c}\right )-\frac {1}{6} i b^2 c^3 \log (c-i x) \log \left (\frac {i x}{c}\right )+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (\frac {i c}{x}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (1-\frac {i x}{c}\right )+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (1+\frac {i x}{c}\right )-\frac {1}{6} \left (i b^2 c^3\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{2 c}\right )}{x} \, dx,x,c-i x\right )+\frac {1}{6} \left (i b^2 c^3\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{2 c}\right )}{x} \, dx,x,c+i x\right )\\ &=-\frac {1}{3} i a b c^2 x+\frac {1}{3} b^2 c^2 x+\frac {1}{6} a b c x^2-\frac {1}{4} i b^2 c^3 \log \left (i-\frac {c}{x}\right )+\frac {1}{12} i b^2 c^3 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} b^2 c^2 x \log \left (1-\frac {i c}{x}\right )+\frac {1}{12} i b^2 c x^2 \log \left (1-\frac {i c}{x}\right )+\frac {1}{6} i b c^2 \left (1-\frac {i c}{x}\right ) x \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} b c x^2 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )+\frac {1}{12} i c^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2+\frac {1}{12} x^3 \left (2 a+i b \log \left (1-\frac {i c}{x}\right )\right )^2-\frac {1}{6} i b^2 c x^2 \log \left (1+\frac {i c}{x}\right )-\frac {1}{3} i a b x^3 \log \left (1+\frac {i c}{x}\right )+\frac {1}{6} b^2 x^3 \log \left (1-\frac {i c}{x}\right ) \log \left (1+\frac {i c}{x}\right )+\frac {1}{12} i b^2 c^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{12} b^2 x^3 \log ^2\left (1+\frac {i c}{x}\right )-\frac {1}{3} a b c^3 \log (c-i x)+\frac {1}{12} i b^2 c^3 \log (c-i x)-\frac {1}{6} i b^2 c^3 \log \left (1-\frac {i c}{x}\right ) \log (c-i x)-\frac {1}{12} i b^2 c^3 \log (c+i x)+\frac {1}{6} i b^2 c^3 \log \left (1+\frac {i c}{x}\right ) \log (c+i x)-\frac {1}{6} i b^2 c^3 \log \left (\frac {c-i x}{2 c}\right ) \log (c+i x)+\frac {1}{6} i b^2 c^3 \log (c-i x) \log \left (\frac {c+i x}{2 c}\right )-\frac {1}{3} a b c^3 \log (x)+\frac {1}{6} i b^2 c^3 \log (c+i x) \log \left (-\frac {i x}{c}\right )-\frac {1}{6} i b^2 c^3 \log (c-i x) \log \left (\frac {i x}{c}\right )+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (\frac {c-i x}{2 c}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (\frac {c+i x}{2 c}\right )+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (-\frac {i c}{x}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (\frac {i c}{x}\right )-\frac {1}{6} i b^2 c^3 \text {Li}_2\left (1-\frac {i x}{c}\right )+\frac {1}{6} i b^2 c^3 \text {Li}_2\left (1+\frac {i x}{c}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.24, size = 152, normalized size = 1.00 \begin {gather*} \frac {1}{3} \left (b^2 c^2 x+a b c x^2+a^2 x^3+b^2 \left (-i c^3+x^3\right ) \text {ArcTan}\left (\frac {c}{x}\right )^2+b \text {ArcTan}\left (\frac {c}{x}\right ) \left (2 a x^3+b c \left (c^2+x^2\right )+2 b c^3 \log \left (1-e^{2 i \text {ArcTan}\left (\frac {c}{x}\right )}\right )\right )-a b c^3 \log \left (1+\frac {c^2}{x^2}\right )+2 a b c^3 \log \left (\frac {c}{x}\right )-i b^2 c^3 \text {PolyLog}\left (2,e^{2 i \text {ArcTan}\left (\frac {c}{x}\right )}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 411 vs. \(2 (134 ) = 268\).
time = 0.38, size = 412, normalized size = 2.71
method | result | size |
derivativedivides | \(-c^{3} \left (-\frac {a^{2} x^{3}}{3 c^{3}}-\frac {b^{2} x^{3} \arctan \left (\frac {c}{x}\right )^{2}}{3 c^{3}}+\frac {b^{2} \arctan \left (\frac {c}{x}\right ) \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{3}-\frac {b^{2} \arctan \left (\frac {c}{x}\right ) x^{2}}{3 c^{2}}-\frac {2 b^{2} \ln \left (\frac {c}{x}\right ) \arctan \left (\frac {c}{x}\right )}{3}+\frac {i b^{2} \dilog \left (\frac {i \left (\frac {c}{x}-i\right )}{2}\right )}{6}-\frac {i b^{2} \ln \left (\frac {c}{x}-i\right ) \ln \left (-\frac {i \left (\frac {c}{x}+i\right )}{2}\right )}{6}-\frac {i b^{2} \ln \left (\frac {c}{x}-i\right )^{2}}{12}-\frac {i b^{2} \dilog \left (-\frac {i \left (\frac {c}{x}+i\right )}{2}\right )}{6}-\frac {i b^{2} \ln \left (\frac {c}{x}+i\right ) \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{6}+\frac {i b^{2} \dilog \left (1-\frac {i c}{x}\right )}{3}+\frac {i b^{2} \ln \left (\frac {c}{x}+i\right ) \ln \left (\frac {i \left (\frac {c}{x}-i\right )}{2}\right )}{6}+\frac {i b^{2} \ln \left (\frac {c}{x}-i\right ) \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{6}-\frac {b^{2} \arctan \left (\frac {c}{x}\right )}{3}-\frac {b^{2} x}{3 c}+\frac {i b^{2} \ln \left (\frac {c}{x}+i\right )^{2}}{12}+\frac {i b^{2} \ln \left (\frac {c}{x}\right ) \ln \left (1-\frac {i c}{x}\right )}{3}-\frac {i b^{2} \dilog \left (1+\frac {i c}{x}\right )}{3}-\frac {i b^{2} \ln \left (\frac {c}{x}\right ) \ln \left (1+\frac {i c}{x}\right )}{3}-\frac {2 a b \,x^{3} \arctan \left (\frac {c}{x}\right )}{3 c^{3}}+\frac {a b \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{3}-\frac {a b \,x^{2}}{3 c^{2}}-\frac {2 a b \ln \left (\frac {c}{x}\right )}{3}\right )\) | \(412\) |
default | \(-c^{3} \left (-\frac {a^{2} x^{3}}{3 c^{3}}-\frac {b^{2} x^{3} \arctan \left (\frac {c}{x}\right )^{2}}{3 c^{3}}+\frac {b^{2} \arctan \left (\frac {c}{x}\right ) \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{3}-\frac {b^{2} \arctan \left (\frac {c}{x}\right ) x^{2}}{3 c^{2}}-\frac {2 b^{2} \ln \left (\frac {c}{x}\right ) \arctan \left (\frac {c}{x}\right )}{3}+\frac {i b^{2} \dilog \left (\frac {i \left (\frac {c}{x}-i\right )}{2}\right )}{6}-\frac {i b^{2} \ln \left (\frac {c}{x}-i\right ) \ln \left (-\frac {i \left (\frac {c}{x}+i\right )}{2}\right )}{6}-\frac {i b^{2} \ln \left (\frac {c}{x}-i\right )^{2}}{12}-\frac {i b^{2} \dilog \left (-\frac {i \left (\frac {c}{x}+i\right )}{2}\right )}{6}-\frac {i b^{2} \ln \left (\frac {c}{x}+i\right ) \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{6}+\frac {i b^{2} \dilog \left (1-\frac {i c}{x}\right )}{3}+\frac {i b^{2} \ln \left (\frac {c}{x}+i\right ) \ln \left (\frac {i \left (\frac {c}{x}-i\right )}{2}\right )}{6}+\frac {i b^{2} \ln \left (\frac {c}{x}-i\right ) \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{6}-\frac {b^{2} \arctan \left (\frac {c}{x}\right )}{3}-\frac {b^{2} x}{3 c}+\frac {i b^{2} \ln \left (\frac {c}{x}+i\right )^{2}}{12}+\frac {i b^{2} \ln \left (\frac {c}{x}\right ) \ln \left (1-\frac {i c}{x}\right )}{3}-\frac {i b^{2} \dilog \left (1+\frac {i c}{x}\right )}{3}-\frac {i b^{2} \ln \left (\frac {c}{x}\right ) \ln \left (1+\frac {i c}{x}\right )}{3}-\frac {2 a b \,x^{3} \arctan \left (\frac {c}{x}\right )}{3 c^{3}}+\frac {a b \ln \left (1+\frac {c^{2}}{x^{2}}\right )}{3}-\frac {a b \,x^{2}}{3 c^{2}}-\frac {2 a b \ln \left (\frac {c}{x}\right )}{3}\right )\) | \(412\) |
risch | \(\text {Expression too large to display}\) | \(25023\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \left (a + b \operatorname {atan}{\left (\frac {c}{x} \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,{\left (a+b\,\mathrm {atan}\left (\frac {c}{x}\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________